โ– humdrum codex / glint v1.0.2
license AGPL-3.0
2.6 KB raw
id
TASK-015
title
Make glint the editor for prose-based editor calls ($EDITOR dispatcher + per-tool)
status
๐ŸŸฆ Backlog
assignee
created_date
2026-06-29 16:36
updated_date
2026-06-29 16:41
labels
feature, release-2
dependencies
priority
medium
ordinal
15000

Description

Adoption feature. $EDITOR is one slot for everything, so a coder keeps their code editor there โ€” but the prose-oriented editor calls (git commit/rebase/merge/tag messages, jj describe, AND gum/huh 'open in editor' prompts, crontab -e, etc.) should be able to reach glint without taking over $EDITOR for code. There is no OS-level text-vs-code split; it must be done per-tool or via a dispatcher.

Two complementary approaches, ideally both offered by a glint setup step (glint -c or a command), idempotent + reversible, documented in the README:

  1. Per-tool config (precise, no extension guessing):

    • git: 'git config --global core.editor glint'
    • jj: 'jj config set --user ui.editor glint' These leave $EDITOR alone.
  2. $EDITOR dispatcher wrapper (general โ€” covers ANY tool that calls $EDITOR, including gum/huh Text fields, crontab -e): A small script set as $EDITOR that routes by the temp file's extension/name โ€” prose (*.md, *.markdown, *.txt, COMMIT_EDITMSG, generic temp) -> glint; everything else -> the user's code editor (nvim/etc.). glint ships/generates the script and points $EDITOR at it. Caveat: extension-based, so tools using an unhinted generic temp name hit the fallback; huh apps can set EditorExtension('.md') but the end user doesn't control that.

One-shot editor mode already works: a tool calls 'glint ', user edits, Ctrl+S saves, Ctrl+Q exits, the tool reads the saved file. Verify glint opens/edits/saves cleanly on non-.md tmpfiles (git COMMIT_EDITMSG); consider a save-on-quit safety so an unsaved message isn't silently empty. Positioning: glint is the terminal WRITING app owning prose edits, not the universal default editor.

Acceptance Criteria